<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>个人中心</title>
		<link rel="stylesheet" type="text/css" href="./Public/Home/css/personal.css"/>
		<script type="text/javascript" src="./Public/Home/js/jquery-1.8.2.min.js"></script>
		<script type="text/javascript" src="./Public/Home/js/area.js"></script>
		<script type="text/javascript" src="Public/uploadify/jquery.uploadify.min.js"></script>
		<link rel="stylesheet" type="text/css" href="Public/uploadify/uploadify.css">
		<!--载入hdjs-->
		<link rel="stylesheet" href="./Public/hdjs/hdjs.css">
		<script src="./Public/hdjs/hdjs.min.js"></script>
	</head>
	<body>
		<header>
			<div id="head_center">
				<h1 class="fl logo">
					<a href="index.html"><img src="./Public/Home/img/logo.jpg" alt="" /></a>
				</h1>
				<p class="mydi fl"><i></i>我的个人中心</p>
				<div class="head_shouye fl">
					<p class="fl"><a href="index.html">首页</a></p>
				</div>
				<form action="{{U('Price/index')}}" class="header_form" method="post">
					<input type="text" name="search" id="" class="sub_text" value="" />
					<input type="submit" class="sub_btn" value="搜索"/>
				</form>
<!--				<div class="shop_cart">-->
<!--					<span class="fl carttext">购物车</span>-->
<!--				</div>-->
			</div>
		</header>
		<div id="main">
			<div class="main_box">
				<!--左侧列表-->
				<div class="content_left">
					<a href="javascript:;" class="person_head son">个人中心</a>
					<!--<div class="clmain">-->
					<h3 class="clhead">订单中心</h3>
						<!--<ul class="clmainul">-->
							<!--<li></li>-->
					<a href="javascript:;" class="son">我的订单</a>
						<!--</ul>-->
					<!--</div>-->
					<!--<div class="clmain">-->
					<h3 class="clhead">账户设置</h3>
						<!--<ul class="clmainul">-->
							<!--<li></li>-->
					<a href="javascript:;" class="son" id="person">个人信息</a>
					<script>
						$(function(){
							$('#person').click(function(){
								var uid=$('#yonghuuid').val();
//								alert(uid);
								$.ajax({
									type:"post",
									url:"{{U('Personal/getPersoninfo')}}",
									data:{u:uid},
									//指定服务器返回的数据类型
									dataType:'json',
									success:function(phpData){
										console.log(phpData);
										var phone='';
										var img='';
										var nickname='';
										var usertruename='';
										var year='';
										var month='';
										var day='';
										var sex='';
										var email='';
										var qq='';
										qq+=phpData.userqq;
										email+=phpData.useremail;
										sex+=phpData.usersex;
										year+=phpData.year;
										month+=phpData.month;
										day+=phpData.day;
										usertruename+=phpData.usertruename;
										nickname+=phpData.usernickname;
										img+=phpData.userimg;
										phone+=phpData.usermobile;
										$('#phone').val(phone);
										$('#userimg').attr("src",img);
										$('.userimg').attr("src",img);
										$('#nickname').val(nickname);
										$('#realname').val(usertruename);
										$('#year').val(year);
										$('#month').val(month);
										$('#day').val(day);
										$('#mailname').val(email);
										$('#qqname').val(qq);
										if(sex==0){
											$('#nan').attr("checked","checked");
										}else{
											$('#nv').attr("checked","checked");
										}
									}
								})
							})
						})
					</script>
<!--					<a href="javascript:;" class="son">我的标签</a>-->
					<a href="javascript:;" class="son">收货地址</a>
					<a href="javascript:;" class="son">修改密码</a>
						<!--</ul>-->
					<!--</div>-->
				</div>
				<!--右侧全部-->
				<div>
				<!--右侧主要部分个人中心-->
				<div class="content_right1 son1">
					<div class="content_right_top">
						<div class="user_info fl">
							<div class="user_info_box">
								<img class="userimg" src="{{if value="isset($userData['userimg'])"}}{{$userData['userimg']}}{{endif}}" alt="" width="80px" height="80px"/>
								<p class="username">{{$userData['usernickname']}}</p>
							</div>
						</div>
						<div class="user_control">
							<h2 class="user_control_title">账户管理</h2>
							<p class="user_phone">手机：
								<span class="user_phone_info">{{if value="!$userData['usermobile']"}}未填写{{else}}{{$userData['usermobile']}}{{endif}}</span>
							</p> 
							<p class="user_mail">邮箱：
								<span class="user_mail_info">{{if value="$userData['useremail']"}}{{$userData['useremail']}}{{else}}未填写{{endif}}</span>
							</p>
							<p class="user_birthday">生日：
								<span class="user_birthday_info">{{if value="$userData['userbirthday']"}}{{$userData['userbirthday']}}{{else}}未填写{{endif}}</span>
							</p>	
						</div>
						<div class="user_tag">
							<h2 class="user_tag_title">我的标签</h2>
							<ul class="tag_ul">
								<li class="tag_li"><span class="tag_name">音乐控</span></li>
								<li class="tag_li"><span class="tag_name">金属质感</span></li>
								<li class="tag_li"><span class="tag_name">音乐控</span></li>
								<li class="tag_li"><span class="tag_name">音乐控</span></li>
								<li class="tag_li"><span class="tag_name">音乐控</span></li>
							</ul>
						</div>
					</div>
					<ul class="content_right_nav">
						<li class="top_son onclick"><a href="javascript:;">待付款<span>{{$num01}}</span></a></li>
						<li class="top_son"><a href="javascript:;">已付款<span>{{$num03}}</span></a></li>
						<li class="top_son"><a href="javascript:;">待收货<span>{{$num04}}</span></a></li>
						<li class="top_son"><a href="javascript:;">已取消<span>{{$num02}}</span></a></li>
					</ul>
					<div class="content_right_order">
						<p class="order_text1">订单信息</p>
						<p class="order_text2">数量</p>
						<p class="order_text3">订单金额</p>
						<p class="order_text4">交易状态</p>
						<p class="order_text5">交易操作</p>
					</div>
					<div class="white_space">
					</div>
					<div class="allbottomson">
						<div class="bottom_son">
							{{foreach from="$finalData" $key="$k" value="$u"}}
							{{if value="$u['orderstate']==0"}}
							<div class="order_info">
								<div class="order_info_top">
									<span class="order_date">{{date('Y-m-d H:i:s',$u['ordertime'])}}</span>
									<span class="order_num">订单号：<i>{{$u['ordernum']}}</i></span>
									<span class="order_num" style="color: red">金额：￥<i>{{$u['orderpri']}}</i></span>
									<div class="caozuotype">
										更多操作
										<ul class="caozuohide">
											<li><a href="{{U('quxiao',['oid'=>$k])}}" class="morecaozuo">取消订单</a></li>
											<li><a href="{{U('zhifu',['oid'=>$k])}}" class="morecaozuo">支付订单</a></li>
										</ul>
									</div>
								</div>
								{{foreach from="$u['value']" value="$v"}}
								<div class="order_info_bottom">
									<div class="goods_info_left">
										<div class="goods_image">
											<a href=""><img src="{{$v['colistimg']}}" alt="" /></a>
										</div>
										<p class="goods_info_title">
											商品: <span>{{$v['coname']}}</span> 规格: <span>{{$v['cogroupid']}}</span>
										</p>
									</div>
									<span class="goods_num">{{$v['olinum']}}</span>
									<p class="goods_price">
										<span class="phone_price">{{$v['olipri']}}</span>
										<span class="transform_price">（含运费：0.00）</span>
										<span class="pay_type">在线支付</span>
									</p>
									<p class="goods_state">
										<a href="javascript:;" style="cursor: default;" class="goods_state_info">待付款</a href="javascript:">
									</p>
								</div>
								{{endforeach}}
							</div>
							{{endif}}
							{{endforeach}}
						</div>
						<div class="bottom_son">
							{{foreach from="$finalData" $key="$k" value="$u"}}
							{{if value="$u['orderstate']==2"}}
							<div class="order_info">
								<div class="order_info_top">
									<span class="order_date">{{date('Y-m-d H:i:s',$u['ordertime'])}}</span>
									<span class="order_num">订单号：<i>{{$u['ordernum']}}</i></span>
									<span class="order_num" style="color: red">金额：￥<i>{{$u['orderpri']}}</i></span>
									<div class="caozuotype">
										等待发货
									</div>
								</div>
								{{foreach from="$u['value']" value="$v"}}
								<div class="order_info_bottom">
									<div class="goods_info_left">
										<div class="goods_image">
											<a href=""><img src="{{$v['colistimg']}}" alt="" /></a>
										</div>
										<p class="goods_info_title">
											商品: <span>{{$v['coname']}}</span> 规格: <span>{{$v['cogroupid']}}</span>
										</p>
									</div>
									<span class="goods_num">{{$v['olinum']}}</span>
									<p class="goods_price">
										<span class="phone_price">{{$v['olipri']}}</span>
										<span class="transform_price">（含运费：0.00）</span>
										<span class="pay_type">在线支付</span>
									</p>
									<p class="goods_state">
										<a href="" class="goods_state_info">已付款</a>
									</p>
								</div>
								{{endforeach}}
							</div>
							{{endif}}
							{{endforeach}}
						</div>
						<div class="bottom_son">

						</div>
						<div class="bottom_son">
							{{foreach from="$finalData" $key="$k" value="$u"}}
							{{if value="$u['orderstate']==1"}}
							<div class="order_info">
								<div class="order_info_top">
									<span class="order_date">{{date('Y-m-d H:i:s',$u['ordertime'])}}</span>
									<span class="order_num">订单号：<i>{{$u['ordernum']}}</i></span>
									<span class="order_num" style="color: red">金额：￥<i>{{$u['orderpri']}}</i></span>
									<div class="caozuotype">
										更多操作
										<ul class="caozuohide">
											<li><a href="javascript:if(confirm('确定删除吗？'))  location.href='{{U('deleteorder',['oid'=>$k])}}';" class="morecaozuo">彻底删除订单</a></li>
											<li><a href="{{U('huifu',['oid'=>$k])}}" class="morecaozuo">恢复订单</a></li>
										</ul>
									</div>
								</div>
								{{foreach from="$u['value']" value="$v"}}
								<div class="order_info_bottom">
									<div class="goods_info_left">
										<div class="goods_image">
											<a href=""><img src="{{$v['colistimg']}}" alt="" /></a>
										</div>
										<p class="goods_info_title">
											商品: <span>{{$v['coname']}}</span> 规格: <span>{{$v['cogroupid']}}</span>
										</p>
									</div>
									<span class="goods_num">{{$v['olinum']}}</span>
									<p class="goods_price">
										<span class="phone_price">{{$v['olipri']}}</span>
										<span class="transform_price">（含运费：0.00）</span>
										<span class="pay_type">在线支付</span>
									</p>
									<p class="goods_state">
										<a href="" class="goods_state_info">已取消</a>
									</p>
								</div>
								{{endforeach}}
							</div>
							{{endif}}
							{{endforeach}}
						</div>
					</div>
<!--					订单列表各种状态切换-->
					<script>
						$(function(){
							$(".top_son").click(function(){
								// 获得当前元素的下标序号
								$(this).addClass('onclick').siblings().removeClass('onclick');
								var num = $(this).index();
								// 让当前元素淡入，兄弟元素淡出
								$(".bottom_son").eq(num).fadeIn(1000).siblings().stop().fadeOut(300);
							})
						})
					</script>
				</div>
				<!--右侧我的订单部分-->
				<div class="content_right2 son1">
					<ul class="content_right_nav">
						<li class="top_gason onclick"><a href="javascript:;">待付款<span>{{$num01}}</span></a></li>
						<li class="top_gason"><a href="javascript:;">已付款<span>{{$num03}}</span></a></li>
						<li class="top_gason"><a href="javascript:;">待收货<span>{{$num04}}</span></a></li>
						<li class="top_gason"><a href="javascript:;">已取消<span>{{$num02}}</span></a></li>
					</ul>
					<div class="content_right_order">
						<p class="order_text1">订单信息</p>
						<p class="order_text2">数量</p>
						<p class="order_text3">订单金额</p>
						<p class="order_text4">交易状态</p>
						<p class="order_text5">交易操作</p>
					</div>
					<div class="white_space">
					</div>
					<div class="allbottomson">
						<div class="bottom_gason">
							{{foreach from="$finalData" $key="$k" value="$u"}}
							{{if value="$u['orderstate']==0"}}
							<div class="order_info">
								<div class="order_info_top">
									<span class="order_date">{{date('Y-m-d H:i:s',$u['ordertime'])}}</span>
									<span class="order_num">订单号：<i>{{$u['ordernum']}}</i></span>
									<span class="order_num" style="color: red">金额：￥<i>{{$u['orderpri']}}</i></span>
									<div class="caozuotype">
										更多操作
										<ul class="caozuohide">
											<li><a href="{{U('quxiao',['oid'=>$k])}}" class="morecaozuo">取消订单</a></li>
											<li><a href="{{U('zhifu',['oid'=>$k])}}" class="morecaozuo">支付订单</a></li>
										</ul>
									</div>
								</div>
								{{foreach from="$u['value']" value="$v"}}
								<div class="order_info_bottom">
									<div class="goods_info_left">
										<div class="goods_image">
											<a href=""><img src="{{$v['colistimg']}}" alt="" /></a>
										</div>
										<p class="goods_info_title">
											商品: <span>{{$v['coname']}}</span> 规格: <span>{{$v['cogroupid']}}</span>
										</p>
									</div>
									<span class="goods_num">{{$v['olinum']}}</span>
									<p class="goods_price">
										<span class="phone_price">{{$v['olipri']}}</span>
										<span class="transform_price">（含运费：0.00）</span>
										<span class="pay_type">在线支付</span>
									</p>
									<p class="goods_state">
										<a href="javascript:;" style="cursor: default;" class="goods_state_info">待付款</a href="javascript:">
									</p>
								</div>
								{{endforeach}}
							</div>
							{{endif}}
							{{endforeach}}
						</div>
						<div class="bottom_gason">
							{{foreach from="$finalData" $key="$k" value="$u"}}
							{{if value="$u['orderstate']==2"}}
							<div class="order_info">
								<div class="order_info_top">
									<span class="order_date">{{date('Y-m-d H:i:s',$u['ordertime'])}}</span>
									<span class="order_num">订单号：<i>{{$u['ordernum']}}</i></span>
									<span class="order_num" style="color: red">金额：￥<i>{{$u['orderpri']}}</i></span>
									<div class="caozuotype">
										等待发货
									</div>
								</div>
								{{foreach from="$u['value']" value="$v"}}
								<div class="order_info_bottom">
									<div class="goods_info_left">
										<div class="goods_image">
											<a href=""><img src="{{$v['colistimg']}}" alt="" /></a>
										</div>
										<p class="goods_info_title">
											商品: <span>{{$v['coname']}}</span> 规格: <span>{{$v['cogroupid']}}</span>
										</p>
									</div>
									<span class="goods_num">{{$v['olinum']}}</span>
									<p class="goods_price">
										<span class="phone_price">{{$v['olipri']}}</span>
										<span class="transform_price">（含运费：0.00）</span>
										<span class="pay_type">在线支付</span>
									</p>
									<p class="goods_state">
										<a href="" class="goods_state_info">已付款</a>
									</p>
								</div>
								{{endforeach}}
							</div>
							{{endif}}
							{{endforeach}}
						</div>
						<div class="bottom_gason">

						</div>
						<div class="bottom_gason">
							{{foreach from="$finalData" $key="$k" value="$u"}}
							{{if value="$u['orderstate']==1"}}
							<div class="order_info">
								<div class="order_info_top">
									<span class="order_date">{{date('Y-m-d H:i:s',$u['ordertime'])}}</span>
									<span class="order_num">订单号：<i>{{$u['ordernum']}}</i></span>
									<span class="order_num" style="color: red">金额：￥<i>{{$u['orderpri']}}</i></span>
									<div class="caozuotype">
										更多操作
										<ul class="caozuohide">
											<li><a href="javascript:if(confirm('确定删除吗？'))  location.href='{{U('deleteorder',['oid'=>$k])}}';" class="morecaozuo">彻底删除订单</a></li>
											<li><a href="{{U('huifu',['oid'=>$k])}}" class="morecaozuo">恢复订单</a></li>
										</ul>
									</div>
								</div>
								{{foreach from="$u['value']" value="$v"}}
								<div class="order_info_bottom">
									<div class="goods_info_left">
										<div class="goods_image">
											<a href=""><img src="{{$v['colistimg']}}" alt="" /></a>
										</div>
										<p class="goods_info_title">
											商品: <span>{{$v['coname']}}</span> 规格: <span>{{$v['cogroupid']}}</span>
										</p>
									</div>
									<span class="goods_num">{{$v['olinum']}}</span>
									<p class="goods_price">
										<span class="phone_price">{{$v['olipri']}}</span>
										<span class="transform_price">（含运费：0.00）</span>
										<span class="pay_type">在线支付</span>
									</p>
									<p class="goods_state">
										<a href="" class="goods_state_info">已取消</a>
									</p>
								</div>
								{{endforeach}}
							</div>
							{{endif}}
							{{endforeach}}
						</div>
					</div>
					<script>
						$(function(){
							$('.top_gason').click(function(){
								$(this).addClass('onclick').siblings().removeClass('onclick');
								// 获得当前元素的下标序号
								var num = $(this).index();
								// 让当前元素淡入，兄弟元素淡出
								$(".bottom_gason").eq(num).fadeIn(1000).siblings().stop().fadeOut(100);
							})
						})
					</script>
				</div>
				<!--右侧个人信息部分-->
				<div class="content_right3 son1">
					<h2 class="user_info_title">个人信息</h2>
					<form action="{{U('detailInfo')}}" class="userinfo_form" method="post">
						<input type="hidden" name="uid" id="yonghuuid" value="{{$_SESSION['userinfo']['uid']}}">
						<div class="userinfo_box">
							<p class="ui_phone tongyong">
								<span class="ui_phonetext">手机   :</span>
								<input type="text" name="usermobile" class="tongyonginput" id="phone" value="">
							</p>
							<div class="ui_img">
								<span class="ui_imgtext">头像 :</span>
								<div class="ui_imgbox">
									<img src="" alt="" id="userimg" width="98px"height="98px"/>
								</div>
							</div>
							<div lab="uploadFile">
								<!-- file表单 -->
								<input id="f" type="file" multiple="true">
								<span>类型: *.jpg,*.png 大小: 2000KB 数量: 1</span>
								<script type="text/javascript">
									$(function() {
										$('#f').uploadify({
											'formData'     : {//POST数据
												'<?php echo session_name();?>' : '<?php echo session_id();?>',
											},
											'fileTypeExts' : '*.jpg;*.png',
											'swf'      : '{{__PUBLIC__}}/uploadify/uploadify.swf',
											'uploader' : '{{U('upload')}}',//指定服务器上传的方法
											'buttonText':'选择文件',
											'fileSizeLimit' : '2000KB',
											'uploadLimit' : 1,//上传文件数
											'width':65,
											'height':25,
											'successTimeout':10,//等待服务器响应时间
											'removeTimeout' : 0.2,//成功显示时间
											'onUploadSuccess' : function(file, data, response) {
												//把php返回的数据转为json
												data=$.parseJSON(data);
												//获得图片地址
												var imageUrl = data.url;
												var li="<li>";
												li += "<img src='"+imageUrl+"' width='98px' height='98px'/>";
												li += "<input type='hidden' id='inputimg' name='userimg' value='"+data.path+"'/><a href='javascript:;' id='self-close0'>X</a>";
												li += "</li>";
												$("#uploadListd ul").prepend(li);
											}
										});

										//关闭图片
										var i = 1;
										$('#self-close0').live('click',function(){
											var src=$('#inputimg').attr('value');
//											alert(src);
											$.ajax({
												type:"post",
												data:{path:src},
												url:"{{U('deleteimg')}}"
											})
											$(this).parent('li').remove();
											i++;
											$('#f').uploadify('settings','uploadLimit',i);
										})
									});
								</script>
								<div id="uploadListd">
									<ul>

									</ul>
								</div>
							</div>
							<p class="ui_nickname tongyong">
								<span class="ui_nicknametext tongyongtext">昵称 :</span>
								<input type="text" name="usernickname" class="tongyonginput" id="nickname" value="" />
							</p>
							<p class="ui_realname tongyong">
								<span class="ui_realnametext tongyongtext">真实姓名 :</span>
								<input type="text" name="usertruename" class="tongyonginput" id="realname" value="" />
							</p>
							<p class="ui_birth tongyong">
								<span class="ui_birthtext tongyongtext">生日 :</span>
								<select name="year" id="year" class="ui_birthyear">
									<option value="2015">2015年</option>
									<option value="2014">2014年</option>
									<option value="2013">2013年</option>
									<option value="2012">2012年</option>
									<option value="2011">2011年</option>
								</select>
								<select name="month" id="month" class="ui_birthmonth">
									<option value="01">1月</option>
									<option value="02">2月</option>
									<option value="03">3月</option>
									<option value="04">4月</option>
									<option value="05">5月</option>
									<option value="06">6月</option>
									<option value="07">7月</option>
									<option value="08">8月</option>
									<option value="09">9月</option>
									<option value="10">10月</option>
									<option value="11">11月</option>
									<option value="12">12月</option>
								</select>
								<select name="day" id="day" class="ui_birthday">
									<option value="01">1日</option>
									<option value="02">2日</option>
									<option value="03">3日</option>
									<option value="04">4日</option>
									<option value="05">5日</option>
									<option value="04">6日</option>
									<option value="05">7日</option>
									<option value="04">8日</option>
									<option value="05">9日</option>
									<option value="04">10日</option>
									<option value="05">11日</option>
								</select>
							</p>
							<p class="tongyong ui_sex">
								<span class="ui_sextext tongyongtext">性别 :</span>
								<input type="radio" name="usersex" class="sex" id="nan" value="0"  /><span><label for="nan">男</label></span>
								<input type="radio" name="usersex" class="sex" id="nv" value="1" /><span><label for="nv">女</label></span>
							</p>
							<p class="ui_mail tongyong">
								<span class="ui_mailtext tongyongtext">邮箱 :</span>
								<input type="text" name="useremail" class="tongyonginput" id="mailname" value="" />
							</p>
							<p class="ui_qq tongyong">
								<span class="ui_qqtext tongyongtext">qq :</span>
								<input type="text" name="userqq" class="tongyonginput" id="qqname" value="" />
							</p>
							<input type="submit" class="tijiao_btn" value="提交">
						</div>
					</form>
				</div>
				<!--右侧添加标签部分-->
<!--				<div class="content_right4 son1">-->
<!--					<h3 class="tag_title">用户标签</h3>-->
<!--					<div class="user_tagbox">-->
<!--						<div class="tagsbox_1">-->
<!--							<dt class="tagson_title">选择学历</dt>-->
<!--							<dd class="data_val">高中及以下</dd>-->
<!--							<dd class="data_val">专科</dd>-->
<!--							<dd class="data_val">本科</dd>-->
<!--							<dd class="data_val">硕士及以上</dd>-->
<!--						</div>-->
<!--					</div>-->
<!--					<div class="user_tagbox">-->
<!--						<div class="tagsbox_1">-->
<!--							<dt class="tagson_title">你喜欢的手机品牌(多选)</dt>-->
<!--							<dd class="data_val">苹果</dd>-->
<!--							<dd class="data_val">三星</dd>-->
<!--							<dd class="data_val">华为</dd>-->
<!--							<dd class="data_val">小米</dd>-->
<!--							<dd class="data_val">三星</dd>-->
<!--							<dd class="data_val">华为</dd>-->
<!--							<dd class="data_val">小米</dd>-->
<!--							<dd class="data_val">三星</dd>-->
<!--							<dd class="data_val">华为</dd>-->
<!--							<dd class="data_val">小米</dd>-->
<!--						</div>-->
<!--					</div>-->
<!--				</div>	-->
				<!--右侧收货地址部分-->
				<div class="content_right5 son1">
					<h3 class="address_title">填写并核对订单信息</h3>
					<h2 class="get_address">收货地址</h2>
					<div class="address">
						{{foreach from="$addressData" value="$u"}}
						<div class="address_box" chooseRid="{{$u['rid']}}" state="{{$u['restate']}}">
							<p class="name">{{$u['rename']}}</p>
							<p class="tel">{{$u['rephone']}}</p>
							<p class="info">{{$u['province']}} &nbsp; {{$u['city']}} &nbsp; {{$u['xian']}}  &nbsp;{{$u['deaddress']}}</p>
							<p class="operate">
								<a href="javascript:;" addressId="{{$u['rid']}}" class="btn change_ad">修改</a>
								<!--编辑地址弹出框-->
								<script type="text/javascript">
									$(function(){
										$(".change_ad").click(function(){
											$(".zhezhao1").fadeIn(200);
											$(".close1").click(function(){
												$(".zhezhao1").fadeOut(200);
											})
										});
									})
								</script>
								<a href="javascript:if(confirm('确定删除吗？'))  location.href='{{U('delAddress',array('rid'=>$u['rid']))}}';" class="btn del_ad">删除</a>
							</p>
							<i class="icon"></i>
						</div>
						{{endforeach}}
<!--						默认选中地址-->
						<script>
							window.onload=function(){
								$('.address_box').each(function(){
									if($(this).attr('state')==1){
										$(this).addClass('address_box1').siblings().removeClass('address_box1');
									}
								})
							}
						</script>
<!--						地址框点击选中效果-->
						<script>
							$(function(){
								$('.address_box').click(function(){
									$(this).addClass('address_box1').siblings().removeClass('address_box1');
									var rid=$(this).attr('chooseRid');
//									alert(rid);
									$.ajax({
										type:"post",
										url:"{{U('Personal/chooseAddress')}}",
										data:{r:rid},
									})
								});
								$('.change_ad').click(function(){
									var rid=$(this).attr('addressId');
//									alert(rid);
									$.ajax({
										type:"post",
										url:"{{U('Personal/editData')}}",
										data:{r:rid},
										//指定服务器返回的数据类型
										dataType:'json',
										success:function(phpData){
											console.log(phpData);
											var str='';
											str+='<div class="form_group">';
											str+='<label for="" class="label">';
											str+='<span class="must">*</span>';
											str+='详细地址：';
											str+='</label>';
											str+='<input type="text" name="deaddress" id="" value="'+phpData.deaddress+'" />';
											str+='</div>';
											str+='<div class="form_group">';
											str+='<label for="" class="label">';
											str+='<span class="must">*</span>';
											str+='收货人：';
											str+='</label>';
											str+='<input type="text" name="rename" id="" value="'+phpData.rename+'" />';
											str+='</div>';
											str+='<div class="form_group">';
											str+='<label for="" class="label">';
											str+='<span class="must">*</span>';
											str+='手机号码：';
											str+='</label>';
											str+='<input type="text" name="rephone" id="" value="'+phpData.rephone+'" />';
											str+='</div>';
											str+='<div class="form_group">';
											str+='<label for="" class="label">';
											str+='<span class="must"></span>';
											str+='</label>';
											str+='</div>';
											str+='<input type="hidden" name="rid" value="'+phpData.rid+'">';
											$('#group1').after(str);
											areap.selected(phpData.province,phpData.city,phpData.xian);
										}
									})
								})
							})
						</script>
						<div class="address_addbox">
							<p class="icon">+</p>
							<p class="name">新增收货地址</p>
						</div>
						<!--添加地址弹出框-->
						<script type="text/javascript">					
							$(function(){
								$(".address_addbox").click(function(){
									$(".zhezhao0").fadeIn(200);
									$(".close0").click(function(){
										$(".zhezhao0").fadeOut(200);
									})
								});
							})
						</script>
					</div>
				</div>
				<!--右侧修改密码区域-->
				<div class="content_right6 son1">
					<form action="{{U('changePassword')}}" method="post">
					<h2 class="user_password_title">修改密码</h2>
					<p class="tongyong">
						<span class="tongyongtext">输入原密码:</span>
						<input type="text" class="tongyonginput" name="oldpassword"/>
					</p>
					<p class="tongyong">
						<span class="tongyongtext">输入新密码:</span>
						<input type="text" class="tongyonginput" name="newpassword" />
					</p>
					<p class="tongyong">
						<span class="tongyongtext">确认新密码:</span>
						<input type="text" class="tongyonginput" name="newpasswordagain"/>
					</p>
						<input type="submit" class="tijiao_btn" value="提交">
					</form>
				</div>
				<!--收货地址添加框开始-->
				<div class="zhezhao zhezhao0">
					<div class="address_form">
						<form action="{{U('addAddress')}}" method="post" id="addform">
							<h3 class="title">添加地址</h3>
							<div class="form_group">
								<label for="" class="label">							
									<span class="must">*</span>
									所在区域：
								</label>
								<script type="text/javascript">
									$(function(){
										//初始化方法
										area.init('a');
										//修改的时候默认被选中效果
										// area.selected('黑龙江','哈尔滨','道里区');
									})
								</script>
								<div class="addselect">
									<select name="province" id="a1">

									</select>
									<select name="city" id="a2">

									</select>
									<select name="xian" id="a3">

									</select>
								</div>
							</div>
							<div class="form_group">
								<label for="" class="label">							
									<span class="must">*</span>
									详细地址：
								</label>
								<input type="text" name="deaddress" id="" value="" />
							</div>
							<div class="form_group">
								<label for="" class="label">							
									<span class="must">*</span>
									收货人：
								</label>
								<input type="text" name="rename" id="" value="" />
							</div>
							<div class="form_group">
								<label for="" class="label">							
									<span class="must">*</span>
									手机号码：
								</label>
								<input type="text" name="rephone" id="" value="" />
							</div>
							<div class="form_group">
								<label for="" class="label">
									<span class="must"></span>
								</label>
							</div>
							<p class="save_btn"><input type="submit" value="保存地址"></p>
							<a href="javascript:;" class="close close0">X</a>
						</form>
					</div>
				</div>
				<!--收货地址添加框结束-->
					<!--收货地址编辑框开始-->
					<div class="zhezhao zhezhao1">
						<div class="address_form">
							<form action="{{U('editAddress')}}" method="post" id="addform">
								<h3 class="title">编辑地址</h3>
								<div class="form_group" id="group1">
									<label for="" class="label">
										<span class="must">*</span>
										所在区域：
									</label>
									<script type="text/javascript">
										$(function(){
											//初始化方法
											areap.init('b');
											//修改的时候默认被选中效果
//											 areap.selected('','哈尔滨','道里区');
										})
									</script>
									<div class="addselect">
										<select name="province" id="b1">

										</select>
										<select name="city" id="b2">

										</select>
										<select name="xian" id="b3">

										</select>
									</div>
								</div>
								<div class="form_group">
									<label for="" class="label">
										<span class="must"></span>
									</label>
								</div>
								<p class="save_btn"><input type="submit" value="保存修改"></p>
								<a href="javascript:;" class="close close1">X</a>
							</form>
						</div>
					</div>
					<!--收货地址编辑框结束-->
				</div>
				<!--点击切换效果-->
				<script type="text/javascript">
					$(function(){
						$(".son").click(function(){							
							var num=$(this).index(".son")
							$(".son1").eq(num).fadeIn(100).siblings().stop().fadeOut(100);
						});
					})
				</script>
			</div>
		</div>		
		<!--底部区域-->
		{{include file="../Common/footer"}}
		<!--底部区域-->
	</body>
</html>
